﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;

namespace LyncServerExtension
{
    /// <summary>
    /// Interface to represent the operations supported by the web service.
    /// This interface is mainly to ensure the match with builder since
    /// the HTTP web service use simmilar but different operation prototypes.
    /// </summary>
    public interface ILyncService
    {
        /// <summary>
        /// Sets the authorized owners.
        /// </summary>
        /// <param name="users">The users.</param>
        /// <returns>A result for the operation.</returns>
        ILyncResult SetAuthorizedOwners(IEnumerable<LyncUser> users);

        /// <summary>
        /// Sets the authorized delegates.
        /// </summary>
        /// <param name="ownerSip">The owner sip.</param>
        /// <param name="users">The users.</param>
        /// <returns>A result for the operation.</returns>
        ILyncResult SetAuthorizedDelegates(string ownerSip, IEnumerable<LyncUser> users);

        /// <summary>
        /// Sets the delegates.
        /// </summary>
        /// <param name="ownerSip">The owner sip.</param>
        /// <param name="users">The users.</param>
        /// <returns>A result for the operation.</returns>
        ILyncResult SetDelegates(string ownerSip, IEnumerable<LyncUser> users);

        /// <summary>
        /// Sets the call forwarding delegation.
        /// </summary>
        /// <param name="param">The param.</param>
        /// <param name="state">
        /// A non used value which can be used by plugins for customisation.
        /// Can be used by a plugin to save the current enabled/disabled state for example.
        /// </param>
        /// <returns>A result for the operation.</returns>
        ILyncResult SetCallForwardingDelegation(LyncCallForwardingParameter param, string state);

        /// <summary>
        /// Errors the specified message.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <returns>A result for the operation.</returns>
        ILyncResult Error(string message);
    }
}
